using GameFramework;
using UnityEngine;

namespace LS
{
    public class VarBounds : Variable<Bounds>
    {
        public VarBounds() : base()
        {
            
        }
        
        /// <summary>
        /// 从 Bounds 到 VarBounds 变量类的隐式转换。
        /// </summary>
        /// <param name="value">值。</param>
        public static implicit operator VarBounds(Bounds value)
        {
            VarBounds varValue = ReferencePool.Acquire<VarBounds>();
            varValue.Value = value;
            return varValue;
        }

        /// <summary>
        /// 从 VarBounds 变量类到 Bounds 的隐式转换。
        /// </summary>
        /// <param name="value">值。</param>
        public static implicit operator Bounds(VarBounds value)
        {
            return value.Value;
        }
    }
}
